package com.ruoyi.crm.mapper;

import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.crm.domain.CrmOrderPayDetails;
import org.apache.ibatis.annotations.Param;

/**
 * 付款计划详情Mapper接口
 *
 * @author ruoyi
 * @date 2024-11-27
 */
public interface CrmOrderPayDetailsMapper extends BaseMapper<CrmOrderPayDetails>
{
    /**
     * 查询付款计划详情
     *
     * @param payDetailsId 付款计划详情主键
     * @return 付款计划详情
     */
    public CrmOrderPayDetails selectCrmOrderPayDetailsByPayDetailsId(String payDetailsId);

    /**
     * 查询付款计划详情列表
     *
     * @param crmOrderPayDetails 付款计划详情
     * @return 付款计划详情集合
     */
    public List<CrmOrderPayDetails> selectCrmOrderPayDetailsList(CrmOrderPayDetails crmOrderPayDetails);

    /**
     * 新增付款计划详情
     *
     * @param crmOrderPayDetails 付款计划详情
     * @return 结果
     */
    public int insertCrmOrderPayDetails(CrmOrderPayDetails crmOrderPayDetails);

    /**
     * 修改付款计划详情
     *
     * @param crmOrderPayDetails 付款计划详情
     * @return 结果
     */
    public int updateCrmOrderPayDetails(CrmOrderPayDetails crmOrderPayDetails);

    /**
     * 删除付款计划详情
     *
     * @param payDetailsId 付款计划详情主键
     * @return 结果
     */
    public int deleteCrmOrderPayDetailsByPayDetailsId(String payDetailsId);

    /**
     * 批量删除付款计划详情
     *
     * @param payDetailsIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCrmOrderPayDetailsByPayDetailsIds(String[] payDetailsIds);

    /**
     * 根据付款id统计 未收款金额
     *
     * @param ids 付款ids
     * @return 结果
     */
    BigDecimal getPayMoney(@Param("ids") List<String> ids);
}
